class CreateVotes < ActiveRecord::Migration
  def self.up
    create_table :votes do |t|
      t.integer :core_id, :limit => 20
      t.integer :multimedia_id, :limit => 20
      t.integer :forum_message_id, :limit => 20
      t.integer :user_id, :limit => 20, :null => false
      t.integer :vote, :limit => 1, :null => false
      t.timestamps
    end
  end

  def self.down
    drop_table :votes
  end
end
